package com.tiandao.mofang.core.richang;

import com.tiandao.mofang.core.RobotSingleton;
import com.tiandao.mofang.core.util.YiDong;
import com.tiandao.mofang.ui.MFFrame;

import java.awt.*;
import java.awt.event.InputEvent;
import java.awt.event.KeyEvent;
import java.util.Date;

/**
 * 地点:九华华清寺海政司
 */
public class Jhjhshzs implements Runnable{
    private static Robot robot = RobotSingleton.getInstance();

    public static void main(String[] args) {
//        robot.mouseMove(150,65);
//        robot.mouseMove(1210,330);
//        try {
//        robot.keyPress(KeyEvent.VK_SPACE);
//        robot.keyRelease(KeyEvent.VK_SPACE);
//        Thread.sleep(600);
//        robot.keyPress(KeyEvent.VK_SPACE);
//        robot.keyRelease(KeyEvent.VK_SPACE);
//        Thread.sleep(600);
//        robot.keyPress(KeyEvent.VK_SPACE);
//        robot.keyRelease(KeyEvent.VK_SPACE);
//        Thread.sleep(500);
//        robot.keyPress(KeyEvent.VK_F);
//        robot.keyRelease(KeyEvent.VK_F);
//        } catch (InterruptedException e) {
//            e.printStackTrace();
//        }
        start();
    }
    @Override
    public void run() {

    }
    //开始
    public static void start(){
        try {
            Thread.sleep(5000);
            YiDong.yfsxqdt(1210,330,YiDong.QDT_JIU_HUA_Y);
            Thread.sleep(15000);
            //寻找海政司布告栏接取任务  1735,3008布告栏位置
            //骑马
            robot.keyPress(KeyEvent.VK_6);
            robot.keyRelease(KeyEvent.VK_6);
            Thread.sleep(1500);
            //寻路
            YiDong.zouLu("2950","2600");
            Thread.sleep(35000);
            //接取任务
            robot.keyPress(KeyEvent.VK_F);
            robot.keyRelease(KeyEvent.VK_F);
            Thread.sleep(2000);
            robot.mouseMove(250,545);
            Thread.sleep(1500);
            robot.mousePress(InputEvent.BUTTON1_MASK);
            robot.mouseRelease(InputEvent.BUTTON1_MASK);
            Thread.sleep(1500);
            robot.mousePress(InputEvent.BUTTON1_MASK);
            robot.mouseRelease(InputEvent.BUTTON1_MASK);
            YiDong.zouLu("2923","2591");
            Thread.sleep(7000);
            //骑马
            robot.keyPress(KeyEvent.VK_6);
            robot.keyRelease(KeyEvent.VK_6);
            Thread.sleep(1500);
            robot.keyPress(KeyEvent.VK_SPACE);
            robot.keyRelease(KeyEvent.VK_SPACE);
            Thread.sleep(600);
            robot.keyPress(KeyEvent.VK_SPACE);
            robot.keyRelease(KeyEvent.VK_SPACE);
            Thread.sleep(600);
            robot.keyPress(KeyEvent.VK_SPACE);
            robot.keyRelease(KeyEvent.VK_SPACE);
            Thread.sleep(500);
            robot.keyPress(KeyEvent.VK_F);
            robot.keyRelease(KeyEvent.VK_F);
            Thread.sleep(3000);
            robot.keyPress(KeyEvent.VK_F);
            robot.keyRelease(KeyEvent.VK_F);
            Thread.sleep(4000);
            MFFrame.textArea.append(new Date()+":    九华九华山海政司日常完毕!\n");
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
